//
//  ZlgChangeWangLuo.m
//  心理FM
//
//  Created by qianfeng on 15/12/29.
//  Copyright (c) 2015年 ZhangLuJie. All rights reserved.
//

#import "ZlgChangeWangLuo.h"
#import "AFNetworking.h"
@implementation ZlgChangeWangLuo

- (void)checkNet
{
    AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager];
    [manager startMonitoring];
    [manager isReachable];
    
    [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
        switch (status) {
            case AFNetworkReachabilityStatusReachableViaWiFi:
            {
                self.block(1);
            }
                break;
            case AFNetworkReachabilityStatusUnknown:
            {
                self.block(3);
            }
                break;
            case AFNetworkReachabilityStatusNotReachable:
            {
                self.block(0);
            }
                break;
            case AFNetworkReachabilityStatusReachableViaWWAN:
            {
                self.block(2);
            }
                break;
            default:
                break;
        }
    }];
}



+ (void)PanDuanWangLuo
{
    __block NSInteger a = 1;
    AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager sharedManager];
    [manager startMonitoring];
    [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
        switch (status) {
            case AFNetworkReachabilityStatusReachableViaWiFi:
            {
                break;
            }
            case AFNetworkReachabilityStatusUnknown:
            {
                a = 3;
                break;
            }
            case AFNetworkReachabilityStatusNotReachable:
            {
                a = 0;
                break;
            }
            default:
                break;
        }
    }];
    
}
@end
